require 'yaml'

def write_customers(customers)
  output = File.new('customers.yaml', 'w')
  output.puts YAML.dump(customers)
  output.close
end

def read_customers
  output = File.new('customers.yaml', 'r')
  customers= YAML.load(output.read)
  output.close
  customers
end

def write_administrators(administrators)
  output = File.new('administrators.yaml', 'w')
  output.puts YAML.dump(administrators)
  output.close
end

def read_adaministrators
  output = File.new('administrators.yaml', 'r')
  administrators= YAML.load(output.read)
  output.close
  administrators
end

def write_employees(employees)
  output = File.new('employees.yaml', 'w')
  output.puts YAML.dump(employees)
  output.close
end

def read_employees
  output = File.new('employees.yaml', 'r')
  employees= YAML.load(output.read)
  output.close
  employees
end